home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Indiana Jones
/
Indiana Jones.exe
/
RESOURCE
/
PREVIEW.GOB
/
cog_14_inf_cinematic_trap.cog
< prev
next >
Wrap
Text File
|
1999-11-15
|
36KB
|
1,094 lines
# Jones 3D Cog Script
#
# 14_INF_Cinematic_Trap.cog
#
# Turner traps Sophia in a mystery cage before Indy can intervene
#
# [HB & SXC]
#
# (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
#
# ==============================================================================
symbols
# .................................. MESSAGES ..................................
message startup
message activated
message callback
message pulse
# .................................. KEYFRAMES .................................
keyframe in_armsCrossed=0in_stand2.key local
keyframe in_handsONhips=0in_stand4.key local
keyframe in_crossArms=0in_stand1_bd_2.key local
keyframe in_handsTOhips=0in_stand1_bd_4.key local # 26x
keyframe in_rtarmup=0in_armsout_1_1.key local
keyframe in_botharmsup=0in_armsup_1_1.key local
keyframe in_hatpush=0in_figithat_4_4.key local
keyframe in_activate=in_activate_medium.key local
keyframe in_stop=0in_stop_1_1.key local
keyframe in_gunout=in_attack_pull_gun.key local # marked x5/cb28
keyframe in_gunaway=in_attack_put_gun.key local # marked x15/cb29
keyframe so_turn=0so_lookright_2_2.key local
keyframe so_lthandup=0so_lefthnd_2_2.key local
keyframe so_handsONhips=0so_stand1.key local
keyframe so_hair=0so_hair_2_2.key local
keyframe so_lookleft=0so_lookleft_2_1.key local
keyframe so_plunge=0so_fallfwd_1_spin.key local
keyframe tu_handsATside=0tu_stand3.key local
keyframe tu_placeimp=0tu_placebox_3_3.key local # marked x60/cb16
keyframe tu_leverpull=0tu_pulleverL_3_3.key local
keyframe tu_leverfutz=0tu_pushlevers_3_3.key local
keyframe tu_sleeve=0tu_forgetivory_3_3.key local # probably temp
keyframe tu_rthand=0tu_righthnd_3_1.key local
keyframe tu_rthand_1_1=0tu_righthnd_1_1.key local
keyframe tu_botharmsup=0tu_armsup_1_3.key local
keyframe tu_handsONhips=0tu_stand1.key local
keyframe tu_pushsophia=0tu_pushsophia_1.key local
keyframe lv_leverpullL=levers_pulleverL_3_3.key local
keyframe lv_leverfutz=levers_pushlevers_3_3.key local
# .................................. MODELS ....................................
model mod_tu_imp2=hand_tu_imp2.3do local
model mod_tu_imp2RT=imp2_invis.3do local
model imp2_invis_on=imp2_invis_inv_on.3do local
# .................................. SOUNDS ....................................
sound in_whistle=Inxj006.wav local
sound in_whathere=Inxj005.wav local
sound tu_worldbeckons=Im03t01.wav local
sound so_dontbefool=Im03s02.wav local
sound in_heytwo=Im03j03c.wav local
sound tu_jonesout=Im03t04.wav local
sound tu_knowlimit=Im03t05.wav local
sound so_lookcrazy=Im03s06.wav local
sound tu_lookdiplomat=Im03t07.wav local
sound so_ahhh=Im03s08.wav local
sound tu_goldminea=Im03t09a.wav local
sound tu_goldmineb=Im03t09b.wav local
sound in_whyhelpthief=Im03j10.wav local
sound tu_namefreedom=Im03t11.wav local
sound in_howsthisa=Im03j12a.wav local
sound in_howsthisb=Im03j12b.wav local
sound tu_forgetivory=Im03t13c.wav local
sound in_letsvote=Im03j14c.wav local
sound so_nooo=Im03s15.wav local
sound in_comeback=Im03j16.wav local
sound tu_seeyoulater=Im03t17.wav local
sound so_indeee=Im03s18.wav local
sound in_dontworry=Im03j19.wav local
sound in_ihope=Im03j20.wav local
sound imppartplace=aet_gem_place.wav local
sound imppartpowup=imp2_powerup.wav local
sound imppartpowdn=imp2_powerdown.wav local
sound imppart2loop=imp2_on_loop.wav local
sound imppartright=aet_lightning_02.wav local
sound pow=imp2_activate.wav local # Autoloaded
sound put=gen_pistol_put.wav local # Autoloaded
sound pull=gen_pistol_pull.wav local # Autoloaded
# MUSIC
sound introwav_a=mus_inf_cutscene1a.wav local
sound introwav_b=mus_inf_cutscene1b.wav local
sound introwav_c=mus_teo_statuerise.wav local
sound introwav_d=mus_inf_cutscene1d.wav local
sound introwav_e=mus_inf_cutscene1e.wav local
sound introwav_f=mus_inf_cutscene1f.wav local
sound introwav_g=mus_inf_cutscene1g.wav local
# SFX
sound cageup=gen_cage_ascend.wav local
sound cagedn=gen_cage_descend.wav local
sound cageloop=gen_cage_loop.wav local
sound cagepwp=gen_cage_powerup.wav local
sound cagesophin=gen_cage_sophia_enter.wav local
sound leverpull=gen_lever_pull.wav local
# ............................... ACTOR THINGS .................................
thing player local
thing indy linkid=0
thing sophia
thing turner
# .............................. OBJECT THINGS .................................
thing doorbutton
thing cageoff nolink
thing cage nolink
thing controlunit nolink
thing imppartpos
thing coredoor nolink
thing floater0
thing floater1
thing floater2
thing floater3
thing floater4
thing floater5
thing floater6
thing floater7
# .............................. CAMERA THINGS .................................
thing cam_1 nolink
thing cam_2 nolink
thing cam_3 nolink
thing cam_4 nolink
thing cam_5 nolink
thing cam_6 nolink
thing cam_7 nolink
thing cam_8 nolink
thing cam_9 nolink
thing cam_10 nolink
thing cam_11 nolink
thing cam_12 nolink
thing cam_13 nolink
thing cam_14 nolink
thing cam_15 nolink
thing cam_16 nolink
thing ct_1 nolink
thing ct_2 nolink
thing ct_3 nolink
thing ct_4 nolink
thing ct_5 nolink
thing ct_6 nolink
thing ct_7 nolink
thing ct_8 nolink
thing ct_9 nolink
thing ct_10 nolink
thing ct_11 nolink
thing ct_12 nolink
thing ct_13 nolink
thing ct_14 nolink
thing ct_15 nolink
thing ct_16 nolink
thing ct_17 nolink
thing ct_18 nolink
thing ct_19 nolink
# .............................. TARGET THINGS .................................
thing in_mk_1 nolink
thing in_mk_2 nolink
thing in_mk_3 nolink
thing in_mk_4 nolink
thing in_mk_5 nolink
thing so_mk_1 nolink
thing so_mk_2 nolink
thing so_mk_3 nolink
thing so_mk_4 nolink
thing so_mk_5 nolink
thing so_mk_6 nolink
thing tu_mk_1 nolink
thing tu_mk_2 nolink
thing tu_mk_3 nolink
thing tu_mk_4 nolink
thing tu_mk_5 nolink
thing tu_mk_6 nolink
thing tu_mk_7 nolink
# thing tu_mk_8 nolink
thing tu_mk_9 nolink
thing cg_mk_2 nolink
# ........................ OTHER ENGINE REFERENCES .............................
cog cagespincog
cog sophiaspincog
template imp2_invis=imp2move local
sector doorsector
# ............................... VARIABLES ....................................
vector v_targetpos local
vector posOffset local
vector angOffset local
flex in_rotRate local
flex so_rotRate local
flex tu_rotRate local
int trapSceneState=0 local # overall state var
int in_collType local
int so_collType local
int tu_collType local
int cg_collType local
int cx_collType local
int in_keyTrack1 local
int in_keyTrack2 local
int so_keyTrack1 local
int tu_keyTrack1 local
int tu_keyTrack2 local
int tu_swapItem1 local
int swapevent=0 local
int curSound local
int curCam local
int vibe local
int curpart local
int loopchan local
int placechan local
int co_colltype local
int fx_channel local
int loopgcagechan local
int wepnum=1 local
int lastrand=-1 local
int currand=0 local
sound indylineb0=inxj058.wav local
sound indylineb1=inxj059.wav local
sound indylineb2=inxj060.wav local
sound indylineb3=inxj061.wav local
sound indylineb4=inxj090.wav local
sound indylineb5=inxj095.wav local
end
# ==============================================================================
code
# ..............................................................................
startup:
# Pointer to Player...
player = GetLocalPlayerThing();
# Prep...
curCam = GetCurrentCamera();
SectorAdjoins(doorsector, 0);
SetThingFlags(indy, 0x80000);
SetThingFlags(sophia, 0x80000);
SetThingFlags(turner, 0x80000);
SetThingFlags(cageoff, 0x80000);
SetThingFlags(cage, 0x80000);
AISetCutSceneMode(indy);
AISetCutSceneMode(sophia);
AISetCutSceneMode(turner);
in_rotRate = GetThingMaxRotVel(indy);
so_rotRate = GetThingMaxRotVel(sophia);
tu_rotRate = GetThingMaxRotVel(turner);
in_collType = GetCollideType(indy);
so_collType = GetCollideType(sophia);
tu_collType = GetCollideType(turner);
co_collType = GetCollideType(cageoff);
cg_collType = GetCollideType(cage);
cx_collType = GetCollideType(controlunit);
return;
# ..............................................................................
activated:
if ((GetSenderRef() == doorbutton) && (trapSceneState == 0) && (GetCurItem(player) == 0))
{
SetThingFlags(floater0, 0x80000);
SetThingFlags(floater1, 0x80000);
SetThingFlags(floater2, 0x80000);
SetThingFlags(floater3, 0x80000);
SetThingFlags(floater4, 0x80000);
SetThingFlags(floater5, 0x80000);
SetThingFlags(floater6, 0x80000);
SetThingFlags(floater7, 0x80000);
# General prep...
trapSceneState = 1;
curCam = GetCurrentCamera();
While(wepnum !=0)
{
wepnum = GetCurWeapon(player);
DeselectWeaponWait(player);
DeselectWeapon(player);
}
StartCutScene(1); # health meter should fade
SetActorFlags(player, 0x200000);
StopThing(player);
DeselectWeaponWait(player);
CopyPlayerHolsters(player, indy);
SetThingflags(player, 0x80000);
ClearThingFlags(indy, 0x80000);
# Cut to shot of Indy at the door...
SetCameraLookInterp(2, 0); # no p & t
SetCameraPosInterp(2, 0); # no dolly
SetCameraFocus(2, cam_1);
SetCameraSecondaryFocus(2, ct_1);
SetCurrentCamera(2);
SetCameraFOV(90, 0, 0.0);
# Prep Indy, Sophia, Turner, cage & controlunit...
ClearThingFlags(sophia, 0x80000);
ClearThingFlags(turner, 0x80000);
ClearThingFlags(cageoff, 0x80000);
# ClearThingFlags(cage, 0x80000);
AISetMoveSpeed(sophia, 1.0);
AISetMoveSpeed(turner, 1.0);
SetThingMaxRotVel(sophia, 50.0);
SetCollideType(indy, 0);
SetCollideType(sophia, 0);
SetCollideType(turner, 0);
SetCollideType(cageoff, 0);
SetCollideType(cage, 0);
SetCollideType(controlunit, 0);
AISetCutSceneMode(sophia);
AISetCutSceneMode(turner);
AISetCutSceneMode(cageoff);
AISetCutSceneMode(cage);
TeleportThing(turner, tu_mk_1);
TeleportThing(sophia, so_mk_1);
AISetLookThingEyeLevel(sophia, so_mk_2);
AISetLookThingEyeLevel(turner, tu_mk_2);
# Indy pushes button, and door opens...
PlayKey(indy, in_activate, 4, 0x12, 0);
Sleep(0.3);
MoveToFrame(doorbutton, 1, 1.0);
WaitForStop(doorbutton);
SectorAdjoins(doorsector, 1);
Sleep(0.01);
MoveToFrame(coredoor, 1, 0.5);
# Swing camera toward core...
SetCameraInterpSpeed(2, 3.5); # was 1.5
SetCameraLookInterp(2, 1);
SetThingMaxRotVel(indy, 100.0);
Sleep(0.5);
SetThingMaxRotVel(indy, 100.0);
AISetLookThingEyeLevel(indy, in_mk_2);
SetCameraSecondaryFocus(2, ct_2);
WaitForStop(coredoor);
#music
PlaySoundLocal(introwav_a, 0.65, 0, 0x0, 0);
# Indy walks into the core...
AttachThingToThing(cam_1, ct_2);
AttachThingToThing(ct_2, indy);
AISetMoveSpeed(indy, 1.0);
AISetMoveThing(indy, in_mk_1, 0);
AIWaitForStop(indy);
# Cut to Indy emerging into core...
DetachThing(cam_1);
DetachThing(ct_2);
AttachThingToThing(cam_2, indy);
SetCameraLookInterp(2, 0);
SetCameraPosInterp(2, 0);
SetCameraFocus(2, cam_2);
SetCameraSecondaryFocus(2, ct_5);
SetCameraFOV(40, 0, 0.0);
Sleep(0.01);
SetCameraFOV(60, 1, 3.0);
# Walk Indy onto the platform...
AttachThingToThing(ct_5, indy);
AISetMoveThing(indy, in_mk_2, 0);
AIWaitForStop(indy);
DetachThing(cam_2);
# Pan to control unit...
SetCameraInterpSpeed(2, 12.0);
SetCameraLookInterp(2, 1);
SetCameraPosInterp(2, 1);
in_keyTrack1 = PlayKey(indy, in_handsONhips, 2, 0x10, 0);
PlayKey(indy, in_handsTOhips, 4, 0x12, 1);
PlayKey(indy, in_hatpush, 4, 0x12, 0);
PlayVoice(indy, in_whistle, 1, 0);
Sleep(0.5);
SetCameraFocus(2, cam_3);
SetCameraSecondaryFocus(2, ct_3);
SetCameraFOV(110, 1, 3.0);
Sleep(1.0);
PlayVoice(indy, in_whathere, 1, 0);
Sleep(3.0);
SetCameraFOV(20, 1, 8.0);
Sleep(3.0);
# Turner and Sophia advance onto platform...
#music
PlaySoundLocal(introwav_b, 1, 0, 0x0, 0);
AISetMoveThing(turner, tu_mk_2, 0);
Sleep(0.7);
AISetMoveThing(sophia, so_mk_2, 0);
Sleep(0.3);
AISetLookThingEyeLevel(turner, tu_mk_5);
AISetMoveThing(turner, tu_mk_3, 0);
Sleep(1.4);
AISetLookThingEyeLevel(sophia, tu_mk_5);
Sleep(0.8);
AISetMoveThing(sophia, so_mk_3, 0);
Sleep(0.5);
AISetLookThingEyeLevel(turner, tu_mk_5);
AISetLookThingEyeLevel(sophia, tu_mk_5);
Sleep(1.3);
# Cut to close-up of control unit...
SetCameraLookInterp(2, 0);
SetCameraPosInterp(2, 0);
SetCameraFocus(2, cam_4);
SetCameraSecondaryFocus(2, ct_4);
SetCameraFOV(30, 0, 0.0);
TeleportThing(turner, tu_mk_4);
DetachThing(ct_5);
# Turner's hands insert IMP into receptacle...
tu_swapItem1 = SetThingMesh(turner, 8, mod_tu_imp2, 0);
tu_keyTrack1 = PlayKey(turner, tu_handsATside, 2, 0x10, 0);
swapevent = 1;
PlayKey(turner, tu_placeimp, 4, 0x12, 0);
sleep(1);
# IMP2 turns on...
#SetThingFlags(imp2, 0x80000);
#ClearThingFlags(imp2_on, 0x80000);
curpart = CreateThing(imp2_invis, imppartpos);
CaptureThing(curpart);
PlaySoundThing(imppartplace, curpart, 1, 10, 20, 0);
MoveToFrame(curpart, 1, 1);
WaitForStop(curpart);
placechan = PlaySoundThing(imppartright, curpart, 1, 10, 20, 0);
PlaySoundThing(imppartpowup, curpart, 1, 10, 20, 0);
SetThingModel(curpart, imp2_invis_on);
WaitForSound(placechan);
loopchan = PlaySoundThing(imppart2loop, curpart, 1, 4, 10, 1);
Sleep(0.5);
# Turner's hand pulls lever...
fx_channel=PlaySoundThing(leverpull, controlunit, 1, 10, 20, 1);
PlayKey(controlunit, lv_leverpullL, 4, 0x12, 0);
PlayKey(turner, tu_leverpull, 4, 0x12, 0);
Sleep(2.5);
StopSound(fx_channel, 0);
# Cut to zoom up-shot of cage...
AttachThingToThingEx(ct_6, cage, 0x5000);
SetCameraFocus(2, cam_5);
SetCameraSecondaryFocus(2, ct_6);
SetCameraFOV(90, 0, 0.0);
Sleep(0.01);
SetCameraFOV(30, 1, 3.0);
Sleep(2.0);
# Track descending cage...
SetPulse(0.1); # camera shake on
ClearThingFlags(cage, 0x80000);
fx_channel=PlaySoundThing(cagepwp, cage, 1, 10, 20, 0);
loopgcagechan=PlaySoundThing(cageloop, cage, 1, 10, 20, 0x0081);
SetThingAlpha(cage, 0.0);
ThingFadeAnim(cage, 0.0, 1.0, 1.0, 0);
ThingFadeAnim(cageoff, 1.0, 0.0, 1.0, 0);
Sleep(1.0);
SendMessage(cagespincog, user0); # spin cage...
DestroyThing(cageoff); # won't see him no more
SetPulse(0.0); # and off again
Sleep(1.0);
SendMessage(cagespincog, user2); # lower cage to middle mark...
fx_channel=PlaySoundThing(cagedn, cage, 1, 10, 20, 0);
PlaySoundLocal(introwav_c, 1, 0, 0x0, 0);
Sleep(0.2);
SetCameraFOV(75, 1, 4.8);
Sleep(5.0);
SetCameraFOV(40, 1, 4.5); # adjust in engine
Sleep(4.5); # adjust in engine!
# Cut to cage past Turner and Sophia at control unit...
SetCameraFocus(2, cam_6);
SetCameraSecondaryFocus(2, ct_7);
SetCameraFOV(25, 0, 0.0);
# Sleep(0.5);
# Turner: "Finally! The new world beckons...we need an ambassador!"
curSound = PlayVoice(turner, tu_worldbeckons, 1.0, 0);
# Turner futzes...
AIEnableHeadTracking(turner, cage);
PlayKey(controlunit, lv_leverfutz, 4, 0x12, 0);
PlayKey(turner, tu_leverfutz, 4, 0x12, 0);
Sleep(0.35);
fx_channel=PlaySoundThing(leverpull, controlunit, 1, 10, 20, 0);
Sleep(0.35);
AISetLookThingEyeLevel(sophia, so_mk_4);
AISetMoveThing(sophia, so_mk_4, 0);
PlayKey(controlunit, lv_leverfutz, 4, 0x12, 0);
tu_keyTrack2 = PlayKey(turner, tu_leverfutz, 4, 0x12, 0);
Sleep(0.35);
fx_channel=PlaySoundThing(leverpull, controlunit, 1, 10, 20, 0);
Sleep(2);
AISetLookThing(sophia, cage);
AIWaitForStop(sophia);
AIDisableHeadTracking(turner);
# Cut inside cage...
AttachThingToThing(ct_8, sophia);
SetCameraFocus(2, cam_7); # inside cage
SetCameraSecondaryFocus(2, ct_8);
SetCameraFOV(65, 0, 0.0);
StopKey(turner, tu_keyTrack1, 0.0);
StopKey(turner, tu_keyTrack2, 0.0);
# Turner and Sophia approach the cage...
AIEnableHeadTracking(sophia, so_mk_6); # keep her head low
AISetMoveThing(sophia, so_mk_5, 0);
AISetLookThingEyeLevel(turner, so_mk_4);
AISetMoveThing(turner, so_mk_4, 0);
Sleep(0.01);
SetCameraFOV(25, 1, 4.2);
Sleep(1.0);
AISetLookThing(turner, so_mk_6);
AISetMoveThing(turner, tu_mk_6, 0);
AIWaitForStop(sophia);
DetachThing(ct_8);
AIDisableHeadTracking(sophia);
AIWaitForStop(turner);
tu_keyTrack1 = PlayKey(turner, tu_handsONhips, 4, 0x10, 0);
PlayKey(turner, tu_rthand, 4, 0x12, 0);
WaitForSound(curSound);
# Sophia: "Don't be a fool...I sense...evil force...waiting to destroy us."
curSound = PlayVoice(sophia, so_dontbefool, 1.0, 0);
PlayKey(sophia, so_turn, 4, 0x12, 1); # 2-2
Sleep(0.5);
PlayKey(sophia, so_lthandup, 4, 0x12, 1); # 2-2
WaitForSound(curSound);
# Cut to Indy walking into frame...
SetCameraFocus(2, cam_8);
SetCameraSecondaryFocus(2, ct_9);
SetCameraFOV(70, 0, 0.0);
StopKey(indy, in_keyTrack1, 0.0);
TeleportThing(indy, in_mk_3);
AISetLookThing(indy, ct_4); # cheat his look away from camera
AISetMoveThing(indy, in_mk_4, 0);
AIWaitForStop(indy);
# Indy: "Hey, you two!"
PlayKey(indy, in_rtarmup, 4, 0x12, 0);
Sleep(0.2);
curSound = PlayVoice(indy, in_heytwo, 1.0, 0);
StopKey(turner, tu_keyTrack1, 0.5);
Sleep(0.5);
WaitForSound(curSound);
# Cut to Turner maneuvering behind Sophia...
SetCameraFocus(2, cam_9);
SetCameraSecondaryFocus(2, ct_10);
SetCameraFOV(35, 0, 0.0);
#so_keyTrack1 = PlayKey(sophia, so_armsFolded, 2, 0x10, 0);
PlayKey(sophia, so_hair, 4, 0x14, 0); #2-2
AttachThingToThing(ct_10, turner);
AIEnableHeadTracking(turner, so_mk_6); # cheat his look a bit
AISetMoveThing(turner, tu_mk_7, 0);
AIWaitForStop(turner);
AIDisableHeadTracking(turner);
# Turner: "Jones?! Stay out of this!"
curSound = PlayVoice(turner, tu_jonesout, 1.0, 0);
WaitForSound(curSound);
# Turner looks toward Sophia...
AISetLookThingEyeLevel(turner, sophia);
# Turner: "Don't worry...know my limitations...contact with spirit world."
curSound = PlayVoice(turner, tu_knowlimit, 1.0, 0);
## PlayKey(turner, tu_sleeve, 4, 0x12, 0); # TEMP!
Sleep(1.0);
WaitForSound(curSound);
# Sophia: "Oh sure. Do I look that crazy to you?"
so_keyTrack1 = PlayKey(sophia, so_handsONhips, 2, 0x00, 0);
#StopKey(sophia, so_keyTrack1, 0.7);
curSound = PlayVoice(sophia, so_lookcrazy, 1.0, 0);
Sleep(0.7);
PlayKey(sophia, so_lookleft, 4, 0x14, 0);
WaitForSound(curSound);
# Turner: "You look like a real diplomat."
PlayVoice(turner, tu_lookdiplomat, 1.0, 0);
Sleep(1.7);
# Turner pushes Sophia into the cage...
# TO DO: sound effect thump...
#music
PlaySoundLocal(introwav_d, 1, 0, 0x0, 0);
PlayKey(turner, tu_pushsophia, 4, 0x12, 0);
Sleep(0.5);
StopKey(sophia, so_keyTrack1, 0.0);
PlayKey(sophia, so_plunge, 4, 0x12, 0);
# Sophia: "Ahhh!"
curSound = PlayVoice(sophia, so_ahhh, 1.0, 0);
Sleep(0.8);
fx_channel=PlaySoundThing(cagesophin, cage, 1, 10, 20, 0);
# TO DO: possibly add a visual effect during pan, maybe a golden flash-bulb
# as when the young woman appeared. In any case, need sounds...
# Camera pans to cage...
SetCameraInterpSpeed(2, 1.0);
SetCameraLookInterp(2, 1); # ready to pan
Sleep(0.01);
SetCameraSecondaryFocus(2, cg_mk_2);
SetCameraFOV(60, 1, 1.0);
# Prep Sophia for her ordeal...
# StopKey(sophia, so_keyTrack1);
ClearPhysicsFlags(sophia, 0x01); # no gravity no more
TeleportThing(sophia, cg_mk_2); # put her inside
AttachThingToThingEx(sophia, cage, 0x5000); # in an unbreakable grip
# Spin sophia...
SendMessage(sophiaspincog, user1); # spin sophia
WaitForSound(curSound);
AISetLookThing(indy, turner); # adjust Indy's look offscreen
Sleep(2.0);
# Cut to wide shot of Indy and Turner...
SetCameraLookInterp(2, 0);
SetCameraFocus(2, cam_10);
SetCameraSecondaryFocus(2, ct_11);
SetCameraFOV(38, 0, 0.0);
Sleep(0.01);
# Turner: "Impressive...gold mine...puzzles...help me solve this one!"
tu_keyTrack1 = PlayKey(turner, tu_handsONhips, 2, 0x10, 0);
curSound = PlayVoice(turner, tu_goldminea, 1.0, 0);
AISetLookThing(turner, indy);
SetThingMaxHeadVel(indy, 100.0);
AIEnableHeadTracking(indy, sophia);
Sleep(2.0);
AIEnableHeadTracking(indy, turner);
in_keyTrack1 = PlayKey(indy, in_armsCrossed, 2, 0x10, 0);
PlayKey(indy, in_crossArms, 4, 0x12, 0);
Sleep(4.0);
curSound = PlayVoice(turner, tu_goldmineb, 1.0, 0);
Sleep(1);
# Cut closer on Turner as he finishes speech...
SetCameraFocus(2, cam_11);
SetCameraSecondaryFocus(2, ct_12);
SetCameraFOV(35, 0, 0.0);
Sleep(4.0);
PlayKey(turner, tu_rthand_1_1, 4, 0x12, 0);
WaitForSound(curSound);
# Cut to single on Indy...
SetCameraFocus(2, cam_12);
SetCameraSecondaryFocus(2, ct_13);
SetCameraFOV(35, 0, 0.0);
AIDisableHeadTracking(indy);
# Indy: "Why should I help a thief?"
curSound = PlayVoice(indy, in_whyhelpthief, 1.0, 0);
in_keyTrack2 = PlayKey(indy, in_handsONhips, 2, 0x10, 0);
StopKey(indy, in_keyTrack1, 0.5);
WaitForSound(curSound);
# Cut back to Turner...
SetCameraFocus(2, cam_13);
SetCameraSecondaryFocus(2, ct_14);
SetCameraFOV(25, 0, 0.0);
# Turner: "In the name of freedom, man! We're in a war!"
curSound = PlayVoice(turner, tu_namefreedom, 1.0, 0);
StopKey(turner, tu_keyTrack1, 0.5);if ((GetCurItem(player) != 0) && (GetSenderID() == 1))
{
StopThing(player);
StartCutscene(1);
SetActorFlags(player, 0x200000);
currand = RandBetween(0, 5);
While (lastrand == currand)
{
currand = RandBetween(0, 5);
}
PlayVoice(player, indylineb0[currand], 1, 1);
lastrand = currand;
EndCutscene();
ClearActorFlags(player, 0x200000);
}
Sleep(0.5);
PlayKey(turner, tu_botharmsup, 4, 0x12, 0);
WaitForSound(curSound);
# Cut to Indy and push in...
SetCameraFocus(2, cam_12);
SetCameraSecondaryFocus(2, ct_13);
SetCameraFOV(35, 0, 0.0);
# Indy: "All right...how's this...apply for a grant...study...sure bet."
curSound = PlayVoice(indy, in_howsthisa, 1.0, 0);
Sleep(0.01);
SetCameraInterpSpeed(2, 12.0);
SetCameraLookInterp(2, 1);
Sleep(0.01);
SetCameraSecondaryFocus(2, ct_15);
SetCameraFOV(20, 1, 12.0);
StopKey(indy, in_keyTrack2, 0.5);
Sleep(1.0);
PlayKey(indy, in_stop, 4, 0x12, 0);
Sleep(3.0);
PlayKey(indy, in_rtarmup, 4, 0x12, 0);
Sleep(3);
WaitForSound(curSound);
curSound = PlayVoice(indy, in_howsthisb, 1.0, 0);
sleep(1);
PlayKey(indy, in_botharmsup, 4, 0x12, 0);
//Sleep(1.0);
WaitForSound(curSound);
# Cut to Turner...
SetCameraLookInterp(2, 0);
SetCameraFocus(2, cam_13);
SetCameraSecondaryFocus(2, ct_14);
SetCameraFOV(30, 0, 0.0);
# Turner: "Forget your ivory-tower, Jones...save democracy!"
curSound = PlayVoice(turner, tu_forgetivory, 1.0, 0);
SetThingMaxRotVel(turner, 500.0);
PlayKey(turner, tu_sleeve, 4, 0x12, 1);
AISetLookThingEyeLevel(turner, so_mk_3);
AIWaitForStop(turner);
AISetMoveThing(turner, so_mk_3, 0);
Sleep(2.0);
WaitForSound(curSound);
# Cut back to Indy...
SetCameraFocus(2, cam_12);
SetCameraSecondaryFocus(2, ct_15);
SetCameraFOV(20, 0, 0.0);
# Indy: "Let's vote on it!"
curSound = PlayVoice(indy, in_letsvote, 1.0, 0);
swapevent = 2; # see callback
in_keyTrack1 = PlayKey(indy, in_gunout, 4, 0x14, 0);
Sleep(0.5);
# TO DO: cause pistol to disappear from holster...
WaitForSound(curSound);
# Cut to Turner pulling levers...
SetCameraFocus(2, cam_14);
SetCameraSecondaryFocus(2, ct_16);
SetCameraFOV(35, 0, 0.0);
StopThing(turner);
TeleportThing(turner, tu_mk_4);
PlayKey(controlunit, lv_leverfutz, 4, 0x12, 0);
PlayKey(turner, tu_leverfutz, 4, 0x12, 0);
Sleep(0.35);
fx_channel=PlaySoundThing(leverpull, controlunit, 1, 10, 20, 0);
Sleep(2.0);
# Track cage ascending into upper barrel of the machine...
#music
PlaySoundLocal(introwav_e, 1, 0, 0x0, 0);
SetCameraFocus(2, cam_5);
SetCameraSecondaryFocus(2, ct_6);
SetCameraFOV(20, 0, 0.0);
Sleep(0.01);
SendMessage(cagespincog, user1); # raise cage to upper mark
fx_channel=PlaySoundThing(cageup, cage, 1, 10, 20, 0);
SetCameraFOV(55, 1, 5.0);
Sleep(1.0);
# Sophia: "Nooo!"
PlayVoice(sophia, so_nooo, 1.0, 0);
# Continue tracking cage...
Sleep(4.0);
SetCameraFOV(50, 1, 5.0);
Sleep(5.0);
# Cut back to Turner...
SetCameraFocus(2, cam_14);
SetCameraSecondaryFocus(2, ct_19);
SetCameraFOV(35, 0, 0.0);
SetCameraInterpSpeed(2, 2.5);
SetCameraLookInterp(2, 1);
AISetLookThing(turner, curpart);
Sleep(0.01);
SetCameraFOV(30, 1, 2.0);
# Turner grabs the IMP and retreats...
#SetThingFlags(imp2_on, 0x80000);
#ClearThingFlags(imp2, 0x80000);
StopSound(loopchan, 0.25);
Sleep(0.5);
swapevent = 3; # see callback
PlayKey(turner, tu_placeimp, 4, 0x12, 0);
sleep(1);
PlaySoundThing(imppartplace, curpart, 1, 10, 20, 0);
PlaySoundThing(imppartpowdn, curpart, 1, 10, 20, 0);
Sleep(0.2);
DestroyThing(curpart);
AISetMoveSpeed(turner, 1.0);
AISetLookThingEyeLevel(turner, tu_mk_9);
AIWaitForStop(turner);
AISetMoveSpeed(turner, 1.3);
AISetMoveThing(turner, tu_mk_9, 0);
SetCameraSecondaryFocus(2, ct_17);
SetCameraFOV(35, 1, 2.5);
Sleep(1.0);
# Indy Voice: "Turner! Come back here!"
curSound = PlayVoice(indy, in_comeback, 1.0, 0);
AIWaitForStop(turner);
# Turner faces Indy...
AISetLookThing(turner, indy);
AIWaitForStop(turner);
WaitForSound(curSound);
# Turner: "See you later, Jones!"
curSound = PlayVoice(turner, tu_seeyoulater, 1.0, 0);
WaitForSound(curSound);
# Turner raises the IMP and disappears...
# TO DO: add anim, turn IMP on, add visual effect for Turner...
PlayKey(turner, tu_placeimp, 4, 0x12, 0);
ThingFadeAnim(turner, 1.0, 0.0, 1.0, 0);
MakeFairyDust(turner, GetThingJointPos(turner, 5));
PlaySoundThing(pow, turner, 1, 10, 20, 0);
Sleep(0.5);
MakeFairyDust(turner, GetThingJointPos(turner, 5));
Sleep(0.5);
MakeFairyDust(turner, GetThingJointPos(turner, 5));
SetThingFlags(turner, 0x80000);
# Cut to Indy...
SetCameraLookInterp(2, 0);
SetCameraFocus(2, cam_12);
SetCameraSecondaryFocus(2, ct_15);
SetCameraFOV(20, 0, 0.0);
Sleep(1.0);
swapevent = 4;
StopKey(indy, in_keyTrack1, 0.0);
PlayKey(indy, in_gunaway, 4, 0x12, 1);
# TO DO: replace gun in holster...
SetThingMaxHeadVel(indy, 50.0);
Sleep(0.01);
AIEnableHeadTracking(indy, sophia);
AISetLookThing(indy, sophia);
Sleep(1.0);
in_keyTrack1 = PlayKey(indy, in_handsONhips, 2, 0x10, 0);
PlayKey(indy, in_handsTOhips, 4, 0x12, 1);
Sleep(0.2);
# Cut to cage and Sophia...
SetCameraFocus(2, cam_5);
SetCameraSecondaryFocus(2, ct_6);
SetCameraFOV(50, 0, 0.0);
Sleep(0.01);
SetCameraFOV(20, 1, 3.0);
# Sophia: "Indeee!"
PlayVoice(sophia, so_indeee, 0.7, 0);
Sleep(3.0);
# Cut to down angle on Indy...
SetCameraFocus(2, cam_15);
SetCameraSecondaryFocus(2, indy);
SetCameraFOV(35, 0, 0.0);
# Indy: "Don't worry, Sophia, I'll think of something!"
PlayVoice(indy, in_dontworry, 1.0, 0);
SetCameraInterpSpeed(2, 3.0);
SetCameraLookInterp(2, 1);
SetCameraPosInterp(2, 1);
Sleep(0.01);
# Crane down to closer...
SetThingMaxHeadVel(indy, 200.0);
SetCameraFocus(2, cam_16);
SetCameraSecondaryFocus(2, ct_18);
SetCameraFOV(25, 1, 3.0);
Sleep(2.5);
AIEnableHeadTracking(indy, in_mk_5);
AISetLookThing(indy, in_mk_5);
Sleep(0.7);
# Indy: "I hope."
PlayVoice(indy, in_ihope, 0.7, 0);
Sleep(0.5);
in_keyTrack2 = PlayKey(indy, in_hatpush, 4, 0x12, 0);
#music
PlaySoundLocal(introwav_f, 1, 0, 0x0, 0);
# TO DO: swap in Indy's good hair head during hat move...
Sleep(1.5);
StopKey(indy, in_keyTrack1, 0.5);
StopKey(indy, in_keyTrack2, 0.5);
Sleep(0.5);
# Prep follow-cam...
v_targetpos = GetThingPos(cam_8);
SetCameraPosition(1, v_targetpos); # prep
Sleep(0.1);
WaitForSound(curSound);
# Clean-up & restore control...
AIDisableHeadTracking(indy);
SetThingFlags(indy, 0x80000);
ClearThingFlags(player, 0x80000);
#SetCollideType(cage, cg_collType);
SetCollideType(controlunit, cx_collType);
SetCameraLookInterp(2, 0);
SetCameraPosInterp(2, 0);
CopyOrientAndPos(indy, player);
ClearActorFlags(player, 0x200000);
SetCurrentCamera(curCam);
ResetCameraFOV(0, 0.0);
EndCutScene();
#music
//PlaySoundLocal(introwav_g, 1, 0, 0x0, 0);
MoveToFrame(coredoor, 0, 2);
WaitForStop(coredoor);
SectorAdjoins(doorsector, 0);
trapSceneState = 2; # close the iron door on this scene
wepnum = 1;
Sleep(3);
ClearThingFlags(floater0, 0x80000);
ClearThingFlags(floater1, 0x80000);
ClearThingFlags(floater2, 0x80000);
ClearThingFlags(floater3, 0x80000);
ClearThingFlags(floater4, 0x80000);
ClearThingFlags(floater5, 0x80000);
ClearThingFlags(floater6, 0x80000);
ClearThingFlags(floater7, 0x80000);
return;
}
if ((GetCurItem(player) != 0) && (GetSenderID() == 1))
{
StopThing(player);
StartCutscene(1);
SetActorFlags(player, 0x200000);
currand = RandBetween(0, 5);
While (lastrand == currand)
{
currand = RandBetween(0, 5);
}
PlayVoice(player, indylineb0[currand], 1, 1);
lastrand = currand;
EndCutscene();
ClearActorFlags(player, 0x200000);
}
return;
# ..............................................................................
callback:
# Only listen for callbacks while this cog's scene is running...
if (trapSceneState != 1)
{
return;
}
if (swapevent == 1)
{
# Turner leaves IMP in socket...
RestoreThingMesh(turner, tu_swapItem1);
#ClearThingFlags(imp2, 0x80000);
swapevent = 0; # reset
}
if (swapevent == 2)
{
# Indy pulls revolver...
ResetHolsterModel(indy, 2);
PlaySoundThing(pull, indy, 1, -1, -1, 0x80);
SetWeaponModel(indy, GetLastPistol(player));
#in_swapItem1 = SetThingMesh(indy, 15, mod_in_gun, 0);
#print("DONT FORGET TO COMMENT THIS OUT RANDYS FIX !!!!!");
swapevent = 0;
}
if (swapevent == 3)
{
# Turner grabs IMP from socket...
tu_swapItem1 = SetThingMesh(turner, 5, mod_tu_imp2RT, 0);
#SetThingFlags(imp2, 0x80000);
swapevent = 0;
}
if (swapevent == 4)
{
# Indy holsters revolver...
SetHolsterModel(indy, GetLastPistol(player), 17);
PlaySoundThing(put, indy, 1, -1, -1, 0x80);
ResetWeaponModel(indy);
swapevent = 0;
}
return;
# ..............................................................................
pulse:
vibe = RandBetween(1, 4);
if (vibe == 1)
{
posOffset = '-0.005 0.00 -0.002';
angOffset = '0.00 -0.002 0.002';
}
if (vibe == 2)
{
posOffset = '0.005 -0.005 0.002';
angOffset = '0.002 0.00 -0.002';
}
if (vibe == 3)
{
posOffset = '0.002 0.005 -0.005';
angOffset = '-0.002 0.002 -0.002';
}
if (vibe == 4)
{
posOffset = '-0.002 0.00 0.005';
angOffset = '0.00 0.00 0.002';
}
SetPOVShake(posOffSet, angOffSet, 200.0, 200.0);
return;
end